A self-applicable partial evaluator for the logic programming language Goedel
نویسنده
چکیده
Partial evaluation is a program specialisation technique that has been shown to have great potential in logic programming, particularly for the specialisation of meta-interpreters by the so-called “Futamura Projections”. Meta-interpreters and other meta-programs are programs which use another program as data. In this thesis we describe a partial evaluator for meta-programs in the logic programming language Gödel. Gödel is a declarative, general-purpose language which provides a number of higher-level programming features, including extensive support for meta-programming with a ground representation. The ground representation is a standard tool in mathematical logic in which object level variables are represented by ground terms at the meta-level. The ground representation is receiving increasing recognition as being essential for declarative meta-programming, although the computational expense that it incurs has largely precluded its use in the past. This thesis extends the basic techniques of partial evaluation to the facilities of Gödel. Particular attention is given to the specialisation of the inherent overheads of meta-programs which use a ground representation and the foundations of a methodology for Gödel meta-programs are laid down. The soundness of the partial evaluation techniques is proved and these techniques are incorporated into a declarative partial evaluator. We describe the implementation and provide termination and correctness proofs for the partial evaluator SAGE, an automatic program specialiser based upon sound finite unfolding that is able to specialise any Gödel meta-program (or indeed, any Gödel program at all). A significant illustration of the success of our techniques for specialising meta-programs which use a ground representation is provided by the self-application of this partial evaluator. We use the partial evaluator to specialise itself with respect to a range of meta-programs. By virtue of its self-applicability SAGE has been used to produce a compiler-generator, which we believe shall prove to be an immensely powerful and useful tool for meta-programming.
منابع مشابه
A Self - Applicable Partial Evaluator for the Logic Programming Language
Partial evaluation is a program specialisation technique that has been shown to have great potential in logic programming, particularly for the specialisation of meta-interpreters by the so-called " Futamura Projections ". Meta-interpreters and other meta-programs are programs which use another program as data. The Futamura projections also show that partial evaluator which is self-applicable (...
متن کاملA Self-Applicable Partial Evaluator for ASM
This paper presents an ooine partial evaluator for Abstract State Machines. Self-application is possible by means of a simpliied version of the partial evaluator written in ASM itself. Using self-application, we have generated compilers for small languages from their interpreter deenitions. We also present techniques for describing the semantics of programming languages, in a way suitable for p...
متن کاملLIX: an Effective Self-applicable Partial Evaluator for Prolog
This paper presents a self-applicable partial evaluator for a considerable subset of full Prolog. The partial evaluator is shown to achieve non-trivial specialisation and be effectively self-applied. The attempts to self-apply partial evaluators for logic programs have, of yet, not been all that successful. Compared to earlier attempts, our lix system is practically usable in terms of efficienc...
متن کاملA Practical Partial Evaluation Scheme for Multi-Paradigm Declarative Languages
We present a practical partial evaluation scheme for multi-paradigm declarative languages combining features from functional, logic, and concurrent programming. In contrast to previous approaches, we consider an intermediate representation for programs into which source programs can be automatically translated. The use of this simplified representation, together with the appropriate control iss...
متن کاملA Practical Method for Program Specialization in aMulti - Paradigm Language ?
This paper summarizes our ndings in the development of partial evaluation tools for Curry, a modern multi-paradigm declarative language which combines features from functional programming, logic programming, and concurrent programming. We present a novel approach to perform automatic program specialization in Curry, which diiers from those presented in the literature for the specialization of f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994